/**
 * @author v.lugovsky
 * created on 16.12.2015
 */
(function () {
    'use strict';

    angular.module('BlurAdmin.pages.member')
        .controller('MemberListCtrl', MemberListCtrl);

    /** @ngInject */
    function MemberListCtrl($scope,MemberModel,Constants,AppUtils) {

        var vm = this;

        vm.memberTypeArray = Constants.memberType;
        vm.params = {};//查询对象
        vm.page = {};
        vm.initPage = function(){
            MemberModel.getMemberPage({
                memberName: vm.params.memberName,
                memberPhone: vm.params.memberPhone,
                memberType: vm.params.memberType,
                pageInfo: {
                    pageSize: 10,
                    pageNumber: vm.page.pageIndex
                }
            }).$promise.then(function(response){
                var result = response.pageResult;
                vm.page = _.clone(result);
            });
        }
        vm.initPage();

        vm.deleted = function(id){

        }
    }

})();
